#ifndef DISPLAYDELEGATE_H
#define DISPLAYDELEGATE_H

#include <QObject>
#include <QStyledItemDelegate>
#include "controller/checkmedevice.h"

class displayDelegate : public QStyledItemDelegate
{
    Q_OBJECT
public:
    explicit displayDelegate(QObject *parent = 0);

protected:
    void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index)const;
    bool editorEvent(QEvent *event, QAbstractItemModel *model, const QStyleOptionViewItem &option, const QModelIndex &index);
    QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const;

signals:
    void ItemDbClick(checkmeDevice info,int index);
};

#endif // DISPLAYDELEGATE_H
